﻿// <copyright file="ProductTest.cs" company="Snowman Consulting">
//     Copyright (c) 2009 Snowman Consulting. All rights reserved.
// </copyright>

namespace SnowmanConsulting.ProductKeyManager.Test
{
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using SnowmanConsulting.ProductKeyManager.Data;    
    
    /// <summary>
    /// This is a test class for ProductTest and is intended
    /// to contain all ProductTest Unit Tests
    /// </summary>
    [TestClass()]
    public class ProductTest
    {
        /// <summary>
        /// test context
        /// </summary>
        private TestContext testContextInstance;

        /// <summary>
        /// Gets or sets the test context which provides
        /// information about and functionality for the current test run.
        /// </summary>
        public TestContext TestContext
        {
            get
            {
                return this.testContextInstance;
            }

            set
            {
                this.testContextInstance = value;
            }
        }

        /// <summary>
        /// A test for Notes
        /// </summary>
        [TestMethod()]
        public void NotesTest()
        {
            Product target = new Product();
            string expected = string.Empty;
            string actual;
            target.Notes = expected;
            actual = target.Notes;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        /// A test for Name
        /// </summary>
        [TestMethod()]
        public void NameTest()
        {
            Product target = new Product();
            string expected = string.Empty;
            string actual;
            target.Name = expected;
            actual = target.Name;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        /// A test for Icon
        /// </summary>
        [TestMethod()]
        public void IconTest()
        {
            string iconurl = "cmd.ico";

            Product target = new Product();
            ProductIcon expected = ProductIconHelper.CreateProductIcon(iconurl);
            ProductIcon actual;
            target.Icon = expected;
            actual = target.Icon;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        /// A test for Category
        /// </summary>
        [TestMethod()]
        public void CategoryTest()
        {
            Product target = new Product();
            string expected = string.Empty;
            string actual;
            target.Category = expected;
            actual = target.Category;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        /// A test for Product Constructor
        /// </summary>
        [TestMethod()]
        public void ProductConstructorTest()
        {
            Product target = new Product();
            Assert.IsNotNull(target);
        }
    }
}
